#include <algorithm>
#include <iostream>
#include <string>
// #include "Date.h"

using namespace std;

class DATE {
   public:
    DATE();
    DATE(int year, int month, int day);
    ~DATE();
    int getMonth() const;
    int getDay() const;
    int getYear() const;
    void Print() const;
    void Increment();
    void Decrement();

   private:
    int month;
    int day;
    int year;
};

DATE::DATE() {
    year = 1970;
    month = 1;
    day = 1;
}

DATE::DATE(int y, int m, int d) {
    year = y;
    month = m;
    day = d;
}

DATE::~DATE() {
    cout << "The DATE CLASS will be destroyed." << endl;
}

int DATE::getMonth() const {
    return month;
}

int DATE::getDay() const {
    return day;
}

int DATE::getYear() const {
    return year;
}

void DATE::Print() const {
    string month_name[12] = {
        "January", "February", "March", "April", "May", "June",
        "July", "August", "September", "October", "November", "December"};
    cout << month_name[month - 1] << " " << day << ", " << year << endl;
}

void DATE::Increment() {
    int daysInMonth[12] = {
        31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    daysInMonth[2 - 1] += (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));

    day++;
    if (day > daysInMonth[month]) {
        day = 1;
        month++;
        if (month > 12) {
            month = 1;
            year++;
        }
    }
}

void DATE::Decrement() {
    int daysInMonth[12] = {
        31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    daysInMonth[2 - 1] += (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));

    day--;
    if (day < 1) {
        month--;
        if (month < 1) {
            month = 12;
            year--;
        }
        day = daysInMonth[month - 1];
    }
}